#ProjectEuler-Problem23:NonAbundantSums

from my_math import find_factors

def find_abundance(num):
    if sum(find_factors(num)) > 2*num:
        return True
    else:
        return False
        
def add_element(abunList,num):
    if find_abundance:
        abunList.append(num)
        
abunList = []
for i in range(12,28124):
    add_element(abunList,i)
allAbunNums = []
for j in abunList:
    for k in abunList:
        if j+k not in allAbunNums:
            allAbunNums.append(j+k)
nonAbun = 0
for i in range(1,28124):
    if i not in allAbunNums:
        nonAbun+=i
print(nonAbun)